/**
 * 
 */
package com.scpii.universal.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scpii.universal.constant.GenericConstants;
import com.scpii.universal.hibernate.dao.WebMenuDao;
import com.scpii.universal.hibernate.entity.WebMenuTab;
import com.scpii.universal.service.WebMenuService;

/**
 * genericWeb
 * @author weny
 * 2012-7-8下午09:56:46
 */
@Service
public class WebMenuServiceImpl extends BaseServiceImpl<WebMenuTab, Integer> implements
		WebMenuService {	
	
	@Resource
	private WebMenuDao webMenuDao;
	
	@Resource
	public void setBaseDao(WebMenuDao webMenuDao) {
		super.setBaseDao(webMenuDao);
	}
	/**
	 * 获取树结构数据
	 * @author zhangqiang
	 * 2012-7-8下午09:56:46
	 */
	public List<WebMenuTab> getTreeData() {
		StringBuffer hql = new StringBuffer("from WebMenuTab menu ");
		hql.append("where menu.intDeleteSign=:intDeleteSign");
		Map<String,Object> argsMap = new HashMap<String,Object>();		
		argsMap.put("intDeleteSign", GenericConstants.DELETE_SIGN_EXIST);
		return webMenuDao.hqlGetList(hql.toString(), argsMap);	
		
	}
}
